package com.blueline.passtong;

import org.ksoap2.serialization.SoapObject;

import com.blueline.passtong.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class MainActivity extends Activity implements OnClickListener {
	private ImageView info_type11;
	private ImageView info_type12;
	private ImageView info_type21;
	private ImageView info_type22;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_activity);

		info_type11 = (ImageView) findViewById(R.id.pass_type_r11);
		info_type11.setOnClickListener(this);

		info_type12 = (ImageView) findViewById(R.id.pass_type_r12);
		info_type12.setOnClickListener(this);
		
		info_type21 = (ImageView) findViewById(R.id.pass_type_r21);
		info_type21.setOnClickListener(this);
		
		info_type22 = (ImageView) findViewById(R.id.pass_type_r22);
		info_type22.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.menu_activity, menu);
		return true;
	}

	public void onClick(View v) {
		Intent intent = new Intent(MainActivity.this, DiscountActivity.class);
		switch (v.getId()) {
		case R.id.pass_type_r11:
			intent.putExtra("passType", 1);
			break;
		case R.id.pass_type_r12:
			intent.putExtra("passType", 2);
			break;
		}
		startActivity(intent);
	}

}
